# Configure Doc ID Prefix
Sets the document ID prefix for a SharePoint site by processing rows from an Excel or JSON file.
Filename pattern (Excel/JSON): filename must contain docidprefix (case-insensitive).
Examples: 20240115 docidprefix sites.xlsx, DocIDPrefix_10332.json
# Columns
| Name | Required | Description |
|---|---|---|
| Url / SiteUrl | Conditional | Server-relative URL of the site. Required when MatterCode is not provided. |
| MatterCode | Conditional | Matter code used to resolve the site URL from the matter list. Required when Url is not provided. |
| ClientCode | No | Client code used together with MatterCode to identify the matter. |
| Prefix | Yes | The document ID prefix string to assign to the site. |
Either Url or MatterCode must be provided. Prefix is required.
# JSON format
A JSON file must contain a flat key/value object with at least Prefix and either Url (or URL) or MatterCode. Example:
{
"MatterCode": "10332",
"Prefix": "10332"
}
# Behavior
Resolves the target site from Url or MatterCode, then sets the document ID prefix on the site using the Document ID Service (opens new window). The .json extension is added to the configuration filename automatically if omitted.
# Related links
- Site Collection handler — create site collections